//
//  DetailsInfoModel.m
//  GentlemanAnime
//
//  Created by dlios on 15-7-1.
//  Copyright (c) 2015年 lanou3g.com 蓝欧科技. All rights reserved.
//

#import "DetailsInfoModel.h"

@implementation DetailsInfoModel
- (void)dealloc
{
    [_infoId release];
    [_title release];
    [_subtitle release];
    [_types release];
    [_zone release];
    [_status release];
    [_last_update_chapter_name release];
    [_last_updatetime release];
    [_cover release];
    [_authors release];
    [_xiangqing release];
    [super dealloc];
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    if ([key isEqualToString:@"id"]) {
        self.infoId = value;
    } else if ([key isEqualToString:@"description"]) {
        self.xiangqing = value;
    }
}

- (void)encodeWithCoder:(NSCoder *)aCoder
{
    [aCoder encodeObject:self.infoId forKey:@"infoId"];
    [aCoder encodeObject:self.title forKey:@"title"];
    [aCoder encodeObject:self.subtitle forKey:@"subtitle"];
    [aCoder encodeObject:self.types forKey:@"types"];
    [aCoder encodeObject:self.zone forKey:@"zone"];
    [aCoder encodeObject:self.status forKey:@"status"];
    [aCoder encodeObject:self.last_update_chapter_name forKey:@"last"];
    [aCoder encodeObject:self.last_updatetime forKey:@"updatetime"];
    [aCoder encodeObject:self.cover forKey:@"cover"];
    [aCoder encodeObject:self.authors forKey:@"authors"];
    [aCoder encodeObject:self.xiangqing forKey:@"xiangqing"];
}

- (instancetype)initWithCoder:(NSCoder *)aDecoder
{
    self = [super init];
    if (self) {
        self.infoId = [aDecoder decodeObjectForKey:@"infoId"];
        self.title = [aDecoder decodeObjectForKey:@"title"];
        self.subtitle = [aDecoder decodeObjectForKey:@"subtitle"];
        self.types = [aDecoder decodeObjectForKey:@"types"];
        self.zone = [aDecoder decodeObjectForKey:@"zone"];
        self.status = [aDecoder decodeObjectForKey:@"status"];
        self.last_update_chapter_name = [aDecoder decodeObjectForKey:@"last"];
        self.last_updatetime = [aDecoder decodeObjectForKey:@"updatetime"];
        self.cover = [aDecoder decodeObjectForKey:@"cover"];
        self.authors = [aDecoder decodeObjectForKey:@"authors"];
        self.xiangqing = [aDecoder decodeObjectForKey:@"xiangqing"];
    }
    return self;
}


@end
